#ifndef _BIZ_H_INCLUDED_
#define _BIZ_H_INCLUDED_
#include "core/reactor/core.h"
#include "module/forwardList.h"

//业务模块，业务代码都在这里实现，core.h中提供了必要的api
class biz
{
private:
    cycle_t& utils;
    biz(cycle_t& _utils):
    utils(_utils){}
    static biz* instance;
    static std::mutex lock;
    static forwardList list;
public:
    static biz* getInstance(cycle_t& utils);

    //处理用户请求
    void userReqHandler(std::map<string, string> dataSet, connection_t* conn);

    //处理对端服务器的请求
    void peerReqHandler(string data, connection_t* conn);
    
    ~biz() = default;
};



#endif